package com.fingard.dsp.bank.directbank.ceb11;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.fingard.dsp.bank.directbank.DirectBase;

public class CEB11Base extends DirectBase {
	protected String getCharset() {
		return getBankConfig().getCharset("GBK");
	}
	
	public static int getCharacterPosition(String string, int index){
	    //这里是获取"|"符号的位置
	    Matcher slashMatcher = Pattern.compile("\\|").matcher(string);
	    int mIdx = 0;
	    while(slashMatcher.find()) {
	       mIdx++;
	       //当"|"符号第N次出现的位置
	       if(mIdx == index){
	          break;
	       }
	    }
	    return slashMatcher.start();
	}
}
